Procs and Locks: A Portable Multiprocessing Platform for Standard ML of New Jersey
نویسندگان
چکیده
in Multilisp) and rely on sophisticated runtime system support ; they don't attempt to be extensible or portable. The Lisp-based system most closely resembling ours is STING [20, 21], a concurrent dialect of Scheme speci-cally intended as a substrate for building higher-level parallel computing environments. STING's basic data types are threads and virtual processors; the system provides ex-ibility in scheduling, storage allocation and thread migration policies while attempting not to compromise eciency. The thread data type is simultaneously lower-level and more complex than an SML/NJ continuation; for example, it includes a thread control block with associated stack, heap segment, saved registers, genealogy information, and other state. Threads are therefore expensive to create, and STING includes several optimizations, such as \thread stealing," to avoid creating new threads when possible. In SML/NJ, threads are represented by simple continuations, which cost almost nothing until they begin executing, so there is no need or opportunity for such optimizations. Similarly, MP has no processor data type; clients can emulate any of STING's scheduling options by explicitly varying queuing disciplines. By using an explicitly stack-based thread model, STING implementations may be able to oer better performance than our continuation-based approach. However, we believe MP presents a simpler view of the multiprocessing environment, which will be easier to port to new hardware and operating system platforms. Matthews [24] describes several implementations of a concurrent extension to Poly/ML using CSP-style communication operators [8]. He describes several implementations, including one for the DEC Fire BLOCKINy multiprocessor. Support for the thread and communication model is hard-wired into the Poly/ML runtime system, and is not designed for easy porting to dierent thread models or hardware platforms. Some existing concurrent systems do stress portabil-ity at the runtime-system level. The Portable Common Runtime system (PCR) [37] oers portable and language-independent facilities for threads, storage management, and other runtime-system features. PCR's implementation of threads is similar to ours: user-level threads are multiplexed on top of kernel threads. However, PCR does not allow the thread package or its scheduling policy to be customized. Although we have stressed simplicity and portability in our MP implementation, better performance is also important. One critical task for the future is to improve the present system's poor locality of reference and consequent memory bus contention. One cause of this problem is SML/NJ's heap-based allocation strategy for procedure frames, which makes callcc and throw cheap relative to ordinary computation but re-uses …
منابع مشابه
A Portable Multiprocessor Interface for Standard Ml of New Jersey
We have designed a portable interface between shared-memory multiprocessors and Standard ML of New Jersey. The interface is based on the conventional kernel thread model and provides facilities that can be used to implement user-level thread packages. The interface supports experimentation with diierent thread scheduling policies and synchronization constructs. It has been ported to three diier...
متن کاملA Comparative Study on the Mechanism, Form and Decorations of Contemporary Chaleshtor Locks and Those from the Safavid Isfahan
Lock is a device that assures safety of human’s life. Iranian locksmiths, in addition to making locks and meeting the essential needs, valued the decorative aspects of such tools. Including pendants and movable types, these locks are portable and they are different from standard, ordinary ones. Artists in this field have incorporated a wide range of artistic, spiritual, cultural and aesthetic v...
متن کاملA Portable C Interface for Standard ML of New Jersey
This paper describes the design and implementation of an interface to C for the SML/NJ ML compiler. The interface supplies ML datatypes with which programmers specify C types and C data. An ML program uses these datatypes to register a foreign C function with the interface and to build speci cations of structured C data. The interface automatically instantiates C function arguments from C data ...
متن کاملA Debugger for Standard Ml 1
We have built a portable, instrumentation-based, replay debugger for the Standard ML of New Jersey compiler. Traditional \source-level" debuggers for compiled languages actually operate at machine level, which makes them complex, diicult to port, and intolerant of compiler optimization. For secure languages like ML, however, debugging support can be provided without reference to the underlying ...
متن کاملPreemption Adaptivity in Time-Published Queue-Based Spin Locks
The proliferation of multiprocessor servers and multithreaded applications has increased the demand for high-performance synchronization. Traditional scheduler-based locks incur the overhead of a full context switch between threads and are thus unacceptably slow for many applications. Spin locks offer low overhead, but they either scale poorly on large-scale SMPs (test-and-set style locks) or b...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2000